.class Lcom/waiqin365/lightapp/dailyreport/ax;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field final synthetic a:Landroid/view/View;

.field final synthetic b:Lcom/waiqin365/lightapp/dailyreport/ReportWithCommentActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/dailyreport/ReportWithCommentActivity;Landroid/view/View;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/dailyreport/ax;->b:Lcom/waiqin365/lightapp/dailyreport/ReportWithCommentActivity;

    iput-object p2, p0, Lcom/waiqin365/lightapp/dailyreport/ax;->a:Landroid/view/View;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 3

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/ax;->a:Landroid/view/View;

    instance-of v0, v0, Landroid/widget/TextView;

    if-eqz v0, :cond_0

    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0xb

    if-le v0, v1, :cond_2

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/ax;->b:Lcom/waiqin365/lightapp/dailyreport/ReportWithCommentActivity;

    const-string/jumbo v1, "clipboard"

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/dailyreport/ReportWithCommentActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/content/ClipboardManager;

    const-string/jumbo v2, "data"

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/ax;->a:Landroid/view/View;

    check-cast v1, Landroid/widget/TextView;

    invoke-virtual {v1}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v1

    invoke-static {v2, v1}, Landroid/content/ClipData;->newPlainText(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Landroid/content/ClipData;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/content/ClipboardManager;->setPrimaryClip(Landroid/content/ClipData;)V

    :cond_0
    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/ax;->b:Lcom/waiqin365/lightapp/dailyreport/ReportWithCommentActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/dailyreport/ReportWithCommentActivity;->e(Lcom/waiqin365/lightapp/dailyreport/ReportWithCommentActivity;)Landroid/widget/PopupWindow;

    move-result-object v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/ax;->b:Lcom/waiqin365/lightapp/dailyreport/ReportWithCommentActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/dailyreport/ReportWithCommentActivity;->e(Lcom/waiqin365/lightapp/dailyreport/ReportWithCommentActivity;)Landroid/widget/PopupWindow;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->dismiss()V

    :cond_1
    return-void

    :cond_2
    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/ax;->b:Lcom/waiqin365/lightapp/dailyreport/ReportWithCommentActivity;

    const-string/jumbo v1, "clipboard"

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/dailyreport/ReportWithCommentActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/text/ClipboardManager;

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/ax;->a:Landroid/view/View;

    check-cast v1, Landroid/widget/TextView;

    invoke-virtual {v1}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/text/ClipboardManager;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0
.end method
